// pages/active/active.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    image: ""
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.getAdvById()
  },
  getAdvById: function () {
    var that = this
    var url =
      'https://www.d-shang.com/index.php?appanonymous/getadvbyid/?id=153'
    wx.request({
      url: url,// 仅为示例，并非真实的接口地址
      success(res) {
        var d = res.data.data
        that.setData({
          image: d.image
        })
      }
    })
  },
  onShareAppMessage: function (ops) {
    if (ops.from === 'button') {
      // 来自页面内转发按钮
      console.log(ops.target)
    }
    return {
      title: '顶上整装定制',
      path: 'pages/active/active',
      success: function (res) {
        // 转发成功
        console.log("转发成功:" + JSON.stringify(res));
      },
      fail: function (res) {
        // 转发失败
        console.log("转发失败:" + JSON.stringify(res));
      }
    }

  }
})